package com.cheng.service;

import com.cheng.common.exception.CommonException;
import com.cheng.data.entity.UserInfoEntity;
import com.cheng.data.entity.UserRoleEntity;
import com.cheng.data.vo.UserInfoVO;

import java.util.List;

/**
 * @author: ChengJW
 * @date: 2021/11/04 21:12
 * @version: 1.0
 * @description: userinfoEntity 处理类
 */
public interface UserInfoService {

    /**
    * @author: ChengJW
    * @params: [userName]
    * @return: com.cheng.data.vo.UserInfoVO
    * @date: 2021/11/7
    * @description: 根据用户名称查询用户信息
    */
    UserInfoVO queryUserInfoByUserName(UserInfoEntity userInfoEntity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [userInfoEntity]
    * @return: java.util.List<com.cheng.data.vo.UserInfoVO>
    * @date: 2021/11/14
    * @description: 查询用户列表信息
    */
    List<UserInfoVO> queryUserList(UserInfoEntity userInfoEntity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/14
    * @description: 新增用户信息
    */
    int insertUserInfo(UserInfoEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [urNm]
    * @return: java.util.List<com.cheng.data.vo.UserInfoVO>
    * @date: 2021/11/14
    * @description: 根据用户名称，查询用户信息
    */
    List<UserInfoEntity> queryUserListByNm(String urNm) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/14
    * @description: 修改用户信息
    */
    int updateUserInfo(UserInfoEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: com.cheng.data.entity.UserInfoEntity
    * @date: 2021/11/14
    * @description: 根据主键查询用户信息
    */
    UserInfoEntity queryUserInfo(String urId) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/14
    * @description: 删除用户信息
    */
    int deleteUserInfo(UserInfoEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [urNm]
    * @return: com.cheng.data.vo.UserInfoVO
    * @date: 2021/11/15
    * @description: 根据用户名称，查询用户所有的信息，包括角色、权限信息
    */
    UserInfoVO queryUserBaseInfoByNm(String urNm) throws CommonException;
}
